import java.io.IOException;
import java.util.StringTokenizer;
import java.util.Vector;

class P10038 {

	private static String newLine = System.getProperty("line.separator");

	static String readLn () {
	        StringBuffer buffer = new StringBuffer();
	        int car = -1;

        	try {
			car = System.in.read();
			while ((car > 0) && (car != newLine.charAt(0))) {
				buffer.append((char)car);
				car = System.in.read();
			}
			if (car == newLine.charAt(0))
				System.in.skip(newLine.length() - 1);
		} catch (IOException e) {
			return (null);
		}

		if ((car < 0) && (buffer.length() == 0))
			return (null);  /* eof */
		return (buffer.toString());
	}


	public static void main(String[] args) {
		String linha = "";
		while ((linha = readLn()) != null) {
			System.out.println(computa(linha));	
		}
	}
	
	private static String computa(String linha) {
		StringTokenizer	linhaQuebrada = new StringTokenizer(linha, " ");
		int numeroDeTokens = Integer.parseInt(linhaQuebrada.nextToken());
		int[] entrada = new int[numeroDeTokens];
		for (int k = 0; k < numeroDeTokens; k++) {
			entrada[k] = Integer.parseInt(linhaQuebrada.nextToken());
		} 
		return ehJolly(entrada);
	}
	
	private static String ehJolly(int[] entrada) {
		Vector diferencas = new Vector();
		int tamanhoDoLaco = entrada.length - 1;
		for (int k = 0; k < tamanhoDoLaco; k++) {
			Integer diferenca = new Integer(Math.abs(entrada[k+1] - entrada[k]));
			if (diferenca.intValue() >= entrada.length || diferenca.intValue() <= 0 || diferencas.contains(diferenca)) {
				return "Not jolly";
			}
			else {
				diferencas.addElement(diferenca);
			}
		}
		return "Jolly";	
	}

}
